<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .father{
            width: 300px;
            height: 300px;
            background-color: pink;
        }
        .son {
            width: 200px;
            height: 200px;
            background-color: purple;
        }
    </style>
</head>
<body>
    <div class="father">
        <div class="son"></div>
    </div>
    <script>
        var father = document.querySelector('.father')
        father.addEventListener('mouseover', function(){
            console.log(11); // 鼠标经过自身盒子会触发,经过子盒子还会触发
        })
        father.addEventListener('mouseenter', function(){
            console.log(22); // 只会经过自身盒子触发 
        })
    </script>
</body>
</html>